Skip to content

Conversation

@IlyaMuravjov
Copy link
Collaborator

Description

Fixes #1933

Most frameworks don't have special timeout assertion, so in expectTimeout only tested method call is generated, while timeout is set using timeout argument of the test annotation in setTestExecutionTimeout

How to test

Manual tests

Generate tests for:

public void sleep() throws InterruptedException {
    Thread.sleep(5000);
}

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@IlyaMuravjov IlyaMuravjov added comp-codegen Issue is related to code generator priority-top-focus Top priority chosen by dev team comp-contest-estimator Issue is related to contest estimator lang-java Issue is related to Java support ctg-bug-fix PR is fixing a bug labels Mar 13, 2023
@EgorkaKulikov EgorkaKulikov removed priority-top-focus Top priority chosen by dev team comp-contest-estimator Issue is related to contest estimator labels Mar 14, 2023
@EgorkaKulikov EgorkaKulikov merged commit 5bdaf7a into main Mar 14, 2023
@EgorkaKulikov EgorkaKulikov deleted the ilya_m/fix-expect-timeout branch March 14, 2023 10:15
denis-fokin pushed a commit that referenced this pull request Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug lang-java Issue is related to Java support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests on timeout for JUnit4 and TestNG are generated without method under test call

3 participants